//工具自动生成请勿修改
import { ViewBase } from "odin";
export namespace LanUtil {
	export let getLan: (key: string) => { Value: string };
	export function setUILanguage(ui: MWGameUI.MWUIButton | MWGameUI.MWUITextblock) {
		if (!this.getLan) {
			return;
		}
		let key: string = null;
		if (ui instanceof MWGameUI.MWUIButton) {
			key = ui.getButtonString();
		}
		else {
			key = ui.getText();
		}

		if (key) {
			let lan = this.getLan(key);
			if (lan) {
				if (ui instanceof MWGameUI.MWUIButton) {
					ui.setButtonString(lan.Value)
				}
				else {
					ui.setText(lan.Value);
				}
			}
		}
	}
}
export class UI_DeathUI extends ViewBase {
	public image_Mask: MWGameUI.MWUIImage;
	public text_ResTime: MWGameUI.MWUITextblock;

    constructor() {
        super("DeathUI");
    }
    public buildSelf(): void {
		this.image_Mask = this.findChildByPath(MWGameUI.MWUIImage, "MWCanvas_2147482460/image_Mask");
		this.text_ResTime = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/text_ResTime");
		LanUtil.setUILanguage(this.text_ResTime);

    }
}
export class UI_GameUI extends ViewBase {
	public rocker_fire: MWGameUI.MWUIVirtualJoystickPanel;
	public text_fire: MWGameUI.MWUITextblock;
	public button_jump: MWGameUI.MWUIButton;
	public image_jump: MWGameUI.MWUIImage;
	public text_jump: MWGameUI.MWUITextblock;
	public button_fly: MWGameUI.MWUIButton;
	public image_fly: MWGameUI.MWUIImage;
	public text_fly: MWGameUI.MWUITextblock;
	public button_hide: MWGameUI.MWUIButton;
	public image_hide: MWGameUI.MWUIImage;
	public text_hide: MWGameUI.MWUITextblock;
	public progressBar_HP: MWGameUI.MWUIProgressbar;
	public text_HP: MWGameUI.MWUITextblock;
	public text_CountDown: MWGameUI.MWUITextblock;
	public image_BG: MWGameUI.MWUIImage;
	public text_kill: MWGameUI.MWUITextblock;
	public text_death: MWGameUI.MWUITextblock;
	public text_count: MWGameUI.MWUITextblock;

    constructor() {
        super("GameUI");
    }
    public buildSelf(): void {
		this.rocker_fire = this.findChildByPath(MWGameUI.MWUIVirtualJoystickPanel, "Canvas/Attack/rocker_fire");
		this.text_fire = this.findChildByPath(MWGameUI.MWUITextblock, "Canvas/Attack/text_fire");
		this.button_jump = this.findChildByPath(MWGameUI.MWUIButton, "Canvas/Jump/button_jump");
		this.image_jump = this.findChildByPath(MWGameUI.MWUIImage, "Canvas/Jump/image_jump");
		this.text_jump = this.findChildByPath(MWGameUI.MWUITextblock, "Canvas/Jump/text_jump");
		this.button_fly = this.findChildByPath(MWGameUI.MWUIButton, "Canvas/Fly/button_fly");
		this.image_fly = this.findChildByPath(MWGameUI.MWUIImage, "Canvas/Fly/image_fly");
		this.text_fly = this.findChildByPath(MWGameUI.MWUITextblock, "Canvas/Fly/text_fly");
		this.button_hide = this.findChildByPath(MWGameUI.MWUIButton, "Canvas/Hide/button_hide");
		this.image_hide = this.findChildByPath(MWGameUI.MWUIImage, "Canvas/Hide/image_hide");
		this.text_hide = this.findChildByPath(MWGameUI.MWUITextblock, "Canvas/Hide/text_hide");
		this.progressBar_HP = this.findChildByPath(MWGameUI.MWUIProgressbar, "Canvas/HP/progressBar_HP");
		this.text_HP = this.findChildByPath(MWGameUI.MWUITextblock, "Canvas/HP/text_HP");
		this.text_CountDown = this.findChildByPath(MWGameUI.MWUITextblock, "Canvas/CountDown/text_CountDown");
		this.image_BG = this.findChildByPath(MWGameUI.MWUIImage, "Canvas/KDA/image_BG");
		this.text_kill = this.findChildByPath(MWGameUI.MWUITextblock, "Canvas/KDA/text_kill");
		this.text_death = this.findChildByPath(MWGameUI.MWUITextblock, "Canvas/KDA/text_death");
		this.text_count = this.findChildByPath(MWGameUI.MWUITextblock, "Canvas/KDA/text_count");
		LanUtil.setUILanguage(this.text_fire);
		this.button_jump.onClicked().add(() => {
			Events.dispatchLocal("PlayButtonClick", "button_jump");
		});
		LanUtil.setUILanguage(this.button_jump);
		LanUtil.setUILanguage(this.text_jump);
		this.button_fly.onClicked().add(() => {
			Events.dispatchLocal("PlayButtonClick", "button_fly");
		});
		LanUtil.setUILanguage(this.button_fly);
		LanUtil.setUILanguage(this.text_fly);
		this.button_hide.onClicked().add(() => {
			Events.dispatchLocal("PlayButtonClick", "button_hide");
		});
		LanUtil.setUILanguage(this.button_hide);
		LanUtil.setUILanguage(this.text_hide);
		LanUtil.setUILanguage(this.text_HP);
		LanUtil.setUILanguage(this.text_CountDown);
		LanUtil.setUILanguage(this.text_kill);
		LanUtil.setUILanguage(this.text_death);
		LanUtil.setUILanguage(this.text_count);

    }
}
export class UI_LeaderboardUI extends ViewBase {
	public text_GameOver: MWGameUI.MWUITextblock;
	public image_RankBG: MWGameUI.MWUIImage;
	public image_Self_1: MWGameUI.MWUIImage;
	public image_Self_2: MWGameUI.MWUIImage;
	public image_Self_3: MWGameUI.MWUIImage;
	public image_Self_4: MWGameUI.MWUIImage;
	public image_Self_5: MWGameUI.MWUIImage;
	public image_Self_6: MWGameUI.MWUIImage;
	public text_rank: MWGameUI.MWUITextblock;
	public text_rank_1: MWGameUI.MWUITextblock;
	public text_rank_2: MWGameUI.MWUITextblock;
	public text_rank_3: MWGameUI.MWUITextblock;
	public text_rank_4: MWGameUI.MWUITextblock;
	public text_rank_5: MWGameUI.MWUITextblock;
	public text_rank_6: MWGameUI.MWUITextblock;
	public text_Name: MWGameUI.MWUITextblock;
	public text_Name_1: MWGameUI.MWUITextblock;
	public text_Name_2: MWGameUI.MWUITextblock;
	public text_Name_3: MWGameUI.MWUITextblock;
	public text_Name_4: MWGameUI.MWUITextblock;
	public text_Name_5: MWGameUI.MWUITextblock;
	public text_Name_6: MWGameUI.MWUITextblock;
	public text_Kill: MWGameUI.MWUITextblock;
	public text_Kill_1: MWGameUI.MWUITextblock;
	public text_Kill_2: MWGameUI.MWUITextblock;
	public text_Kill_3: MWGameUI.MWUITextblock;
	public text_Kill_4: MWGameUI.MWUITextblock;
	public text_Kill_5: MWGameUI.MWUITextblock;
	public text_Kill_6: MWGameUI.MWUITextblock;
	public text_Death: MWGameUI.MWUITextblock;
	public text_Death_1: MWGameUI.MWUITextblock;
	public text_Death_2: MWGameUI.MWUITextblock;
	public text_Death_3: MWGameUI.MWUITextblock;
	public text_Death_4: MWGameUI.MWUITextblock;
	public text_Death_5: MWGameUI.MWUITextblock;
	public text_Death_6: MWGameUI.MWUITextblock;
	public text_cllection: MWGameUI.MWUITextblock;
	public text_cllection_1: MWGameUI.MWUITextblock;
	public text_cllection_2: MWGameUI.MWUITextblock;
	public text_cllection_3: MWGameUI.MWUITextblock;
	public text_cllection_4: MWGameUI.MWUITextblock;
	public text_cllection_5: MWGameUI.MWUITextblock;
	public text_cllection_6: MWGameUI.MWUITextblock;
	public image_Line_1: MWGameUI.MWUIImage;
	public image_Line_2: MWGameUI.MWUIImage;
	public image_Line_3: MWGameUI.MWUIImage;
	public image_Line_4: MWGameUI.MWUIImage;
	public image_Line_5: MWGameUI.MWUIImage;
	public image_Line_6: MWGameUI.MWUIImage;
	public button_Close: MWGameUI.MWUIButton;

    constructor() {
        super("LeaderboardUI");
    }
    public buildSelf(): void {
		this.text_GameOver = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/text_GameOver");
		this.image_RankBG = this.findChildByPath(MWGameUI.MWUIImage, "MWCanvas_2147482460/Leaderboard/image_RankBG");
		this.image_Self_1 = this.findChildByPath(MWGameUI.MWUIImage, "MWCanvas_2147482460/Leaderboard/image_Self_1");
		this.image_Self_2 = this.findChildByPath(MWGameUI.MWUIImage, "MWCanvas_2147482460/Leaderboard/image_Self_2");
		this.image_Self_3 = this.findChildByPath(MWGameUI.MWUIImage, "MWCanvas_2147482460/Leaderboard/image_Self_3");
		this.image_Self_4 = this.findChildByPath(MWGameUI.MWUIImage, "MWCanvas_2147482460/Leaderboard/image_Self_4");
		this.image_Self_5 = this.findChildByPath(MWGameUI.MWUIImage, "MWCanvas_2147482460/Leaderboard/image_Self_5");
		this.image_Self_6 = this.findChildByPath(MWGameUI.MWUIImage, "MWCanvas_2147482460/Leaderboard/image_Self_6");
		this.text_rank = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Rank/text_rank");
		this.text_rank_1 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Rank/text_rank_1");
		this.text_rank_2 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Rank/text_rank_2");
		this.text_rank_3 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Rank/text_rank_3");
		this.text_rank_4 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Rank/text_rank_4");
		this.text_rank_5 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Rank/text_rank_5");
		this.text_rank_6 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Rank/text_rank_6");
		this.text_Name = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Name/text_Name");
		this.text_Name_1 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Name/text_Name_1");
		this.text_Name_2 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Name/text_Name_2");
		this.text_Name_3 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Name/text_Name_3");
		this.text_Name_4 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Name/text_Name_4");
		this.text_Name_5 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Name/text_Name_5");
		this.text_Name_6 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Name/text_Name_6");
		this.text_Kill = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Kill/text_Kill");
		this.text_Kill_1 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Kill/text_Kill_1");
		this.text_Kill_2 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Kill/text_Kill_2");
		this.text_Kill_3 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Kill/text_Kill_3");
		this.text_Kill_4 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Kill/text_Kill_4");
		this.text_Kill_5 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Kill/text_Kill_5");
		this.text_Kill_6 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Kill/text_Kill_6");
		this.text_Death = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Death/text_Death");
		this.text_Death_1 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Death/text_Death_1");
		this.text_Death_2 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Death/text_Death_2");
		this.text_Death_3 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Death/text_Death_3");
		this.text_Death_4 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Death/text_Death_4");
		this.text_Death_5 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Death/text_Death_5");
		this.text_Death_6 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Death/text_Death_6");
		this.text_cllection = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Collection/text_cllection");
		this.text_cllection_1 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Collection/text_cllection_1");
		this.text_cllection_2 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Collection/text_cllection_2");
		this.text_cllection_3 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Collection/text_cllection_3");
		this.text_cllection_4 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Collection/text_cllection_4");
		this.text_cllection_5 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Collection/text_cllection_5");
		this.text_cllection_6 = this.findChildByPath(MWGameUI.MWUITextblock, "MWCanvas_2147482460/Leaderboard/Collection/text_cllection_6");
		this.image_Line_1 = this.findChildByPath(MWGameUI.MWUIImage, "MWCanvas_2147482460/Leaderboard/Line/image_Line_1");
		this.image_Line_2 = this.findChildByPath(MWGameUI.MWUIImage, "MWCanvas_2147482460/Leaderboard/Line/image_Line_2");
		this.image_Line_3 = this.findChildByPath(MWGameUI.MWUIImage, "MWCanvas_2147482460/Leaderboard/Line/image_Line_3");
		this.image_Line_4 = this.findChildByPath(MWGameUI.MWUIImage, "MWCanvas_2147482460/Leaderboard/Line/image_Line_4");
		this.image_Line_5 = this.findChildByPath(MWGameUI.MWUIImage, "MWCanvas_2147482460/Leaderboard/Line/image_Line_5");
		this.image_Line_6 = this.findChildByPath(MWGameUI.MWUIImage, "MWCanvas_2147482460/Leaderboard/Line/image_Line_6");
		this.button_Close = this.findChildByPath(MWGameUI.MWUIButton, "MWCanvas_2147482460/button_Close");
		LanUtil.setUILanguage(this.text_GameOver);
		LanUtil.setUILanguage(this.text_rank);
		LanUtil.setUILanguage(this.text_rank_1);
		LanUtil.setUILanguage(this.text_rank_2);
		LanUtil.setUILanguage(this.text_rank_3);
		LanUtil.setUILanguage(this.text_rank_4);
		LanUtil.setUILanguage(this.text_rank_5);
		LanUtil.setUILanguage(this.text_rank_6);
		LanUtil.setUILanguage(this.text_Name);
		LanUtil.setUILanguage(this.text_Name_1);
		LanUtil.setUILanguage(this.text_Name_2);
		LanUtil.setUILanguage(this.text_Name_3);
		LanUtil.setUILanguage(this.text_Name_4);
		LanUtil.setUILanguage(this.text_Name_5);
		LanUtil.setUILanguage(this.text_Name_6);
		LanUtil.setUILanguage(this.text_Kill);
		LanUtil.setUILanguage(this.text_Kill_1);
		LanUtil.setUILanguage(this.text_Kill_2);
		LanUtil.setUILanguage(this.text_Kill_3);
		LanUtil.setUILanguage(this.text_Kill_4);
		LanUtil.setUILanguage(this.text_Kill_5);
		LanUtil.setUILanguage(this.text_Kill_6);
		LanUtil.setUILanguage(this.text_Death);
		LanUtil.setUILanguage(this.text_Death_1);
		LanUtil.setUILanguage(this.text_Death_2);
		LanUtil.setUILanguage(this.text_Death_3);
		LanUtil.setUILanguage(this.text_Death_4);
		LanUtil.setUILanguage(this.text_Death_5);
		LanUtil.setUILanguage(this.text_Death_6);
		LanUtil.setUILanguage(this.text_cllection);
		LanUtil.setUILanguage(this.text_cllection_1);
		LanUtil.setUILanguage(this.text_cllection_2);
		LanUtil.setUILanguage(this.text_cllection_3);
		LanUtil.setUILanguage(this.text_cllection_4);
		LanUtil.setUILanguage(this.text_cllection_5);
		LanUtil.setUILanguage(this.text_cllection_6);
		this.button_Close.onClicked().add(() => {
			Events.dispatchLocal("PlayButtonClick", "button_Close");
		});
		LanUtil.setUILanguage(this.button_Close);

    }
}
export class UI_Main extends ViewBase {

    constructor() {
        super("Main");
    }
    public buildSelf(): void {

    }
}
export class UI_StartUI extends ViewBase {
	public startBG: MWGameUI.MWUIImage;
	public button_start: MWGameUI.MWUIButton;

    constructor() {
        super("StartUI");
    }
    public buildSelf(): void {
		this.startBG = this.findChildByPath(MWGameUI.MWUIImage, "Canvas/startBG");
		this.button_start = this.findChildByPath(MWGameUI.MWUIButton, "Canvas/button_start");
		this.button_start.onClicked().add(() => {
			Events.dispatchLocal("PlayButtonClick", "button_start");
		});
		LanUtil.setUILanguage(this.button_start);

    }
}
export class UI_UIRoot extends ViewBase {

    constructor() {
        super("UIRoot");
    }
    public buildSelf(): void {
		LanUtil.setUILanguage(this.findChildByPath(MWGameUI.MWUITextblock, "Canvas/Loading/Msg_txt"));

    }
}